<!--{eval $_TPL['titles'] = array('品牌');}-->
<!--{template header_tpl}-->
    <div class="main_con">
        <div class="left">
			<div class="brands">
				<form action="<!--{eval echo base_url();}-->brand/orderBrand" method="post" accept-charset="utf-8">
					<div class="brands_top"></div>
					<div class="barnd_mid">
						<ul class="brands_list">
							<!--{loop $brands $brand}-->
							<li onmouseover="brandItemOnMouseOver(this)" onmouseout="brandItemOnMouseOut(this)" onclick="brandItemOnClick(this)" id="brand_item_{$brand['bid']}" class="brand_box <!--{if $brand['isselected']}--> brand_box_selected <!--{/if}-->" >
									<div class="brand_content">
										<div class="brand_content_logo">
											<img src="{$brand['logourl']}" width="80">
										</div>
									<div class="brand_name">
										<span>{$brand['name']}</span>
										<input id="brand_{$brand['bid']}" type="checkbox" value="{$brand['bid']}" name="brand_selected[]" <!--{if $brand['isselected']}--> checked <!--{/if}-->>
									</div>
								</div>
							</li>
							<!--{/loop}-->
						</ul>
					</div>
					<div class="barnd_submit">
					<!--{if $userinfo['username']}-->
					邮箱：<input type="text" name="email" value="{$mybrands[email]}"><input type="submit" name="orderbrand" value="订阅" id="orderbrand" />
					<!--{else}-->
					登录以后就可以订阅了。
					<!--{/if}-->
					</div>
					<div class="brand_btm"></div>
					<div style="clear:both"></div>
				</form>
			</div>
        </div>

        <div class="right">
			<!--{template right_side}-->
        </div>
    </div>
<script type="text/javascript">
function brandItemOnMouseOver(eventObj){
	eventObj.style.cursor = 'pointer';
	setTimeout(
		function(){
			eventObj.className = "brand_box brand_box_selected";
		}
	);	
}
function brandItemOnMouseOut(eventObj){
	eventObj.style.cursor = 'default';
	
	var id = eventObj.getAttribute("id").split("_");
	var chk = $("#brand_" + id[2]);
	if(!chk.attr('checked')){
		setTimeout(
			function(){
				eventObj.className = "brand_box";
			}
		);	
	}		
}

function brandItemOnClick(eventObj){
	var id = eventObj.getAttribute("id").split("_");
	var chk = $("#brand_" + id[2]);
	if(chk.attr('checked') === false){
		setTimeout(
			function(){
				eventObj.className = "brand_box brand_box_selected";
			}
		);
	}else{
		setTimeout(
			function(){
				eventObj.className = "brand_box";
			}
		);		
	}
}
</script>
<!--{template footer_tpl}-->